use data2023, clear

###########
## Table 1 Distribution
###########
table year
table year onlinevote
table proptype
table proptype onlinevote


###########
## Table 2 Descriptive Statistics
###########
tabstat wvote wveto pass wtop1 wsize wsoe boardsize dindepend winstinvest wbm wmarket wgdp dual wAR12 woutshare wturnover if onlinevote==1, stat(n mean sd median) long col(stat) f(%9.0g %9.4f)
tabstat wvote wveto pass wtop1 wsize wsoe boardsize dindepend winstinvest wbm wmarket wgdp dual wAR12 woutshare wturnover if onlinevote==0, stat(n mean sd median) long col(stat) f(%9.0g %9.4f)
ttable3 wvote wveto pass wtop1 wsize wsoe boardsize dindepend winstinvest wbm wmarket wgdp dual wAR12 woutshare wturnover, by(onlinevote) f(%9.4f) une
ttable3 wvote wveto pass wtop1 wsize wsoe boardsize dindepend winstinvest wbm wmarket wgdp dual wAR12 woutshare wturnover, by(onlinevote) f(%9.4f) med


###########
## Table 3 Online Voting and Minority Shareholders’ Participation and Dissent 
###########
eststo clear
reghdfe wvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype ind2) vce(cluster code)
eststo est1
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype ind2) vce(cluster code)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)


###########
## Table 4 Robustness Tests
###########
## Panel A
eststo clear
reghdfe wvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype code) vce(cluster code)
eststo est1
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype code) vce(cluster code)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)

## Panel B
eststo clear
xi: etregress wvote wtop1 wsize wsoe winstinvest boardsize dindepend wbm wmarket wgdp dual wAR12 i.year i.proptype i.ind2, treat(onlinevote = woutshare wturnover wtop1_tra wsize wsoe wbm wmarket wgdp wAR12) twostep
eststo est1
estout est1, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)
eststo clear
xi: etregress wveto wtop1 wsize wsoe winstinvest boardsize dindepend wbm wmarket wgdp dual wAR12 i.year i.proptype i.ind2, treat(onlinevote = woutshare wturnover wtop1_tra wsize wsoe wbm wmarket wgdp wAR12) twostep
eststo est2
estout est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)


###########
## Table 6 Different types of proposals
###########
## VOTE
eststo clear
reghdfe wvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if proptype=="Equity issuance", abs(year ind2) vce(cluster code)
eststo est1
reghdfe wvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if proptype=="Related Party Transactions", abs(year ind2) vce(cluster code)
eststo est2
reghdfe wvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if proptype=="Investments", abs(year ind2) vce(cluster code)
eststo est3
reghdfe wvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if proptype!="Investments" & proptype!="Related Party Transactions" & proptype!="Equity issuance", abs(year ind2) vce(cluster code)
eststo est4
estout est1 est2 est3 est4, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)

## VETO
eststo clear
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if proptype=="Equity issuance", abs(year ind2) 
eststo est1
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if proptype=="Related Party Transactions", abs(year ind2) 
eststo est2
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if proptype=="Investments", abs(year ind2) 
eststo est3
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if proptype!="Investments" & proptype!="Related Party Transactions" & proptype!="Equity issuance", abs(year ind2) 
eststo est4
estout est1 est2 est3 est4, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)


###########
## Table 7 Firm Performance, Online Voting, and Shareholder Dissent
###########
## ROA
eststo clear
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if under_roa==1, abs(year proptype ind12) vce(cluster code)
eststo est1
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if under_roa==0, abs(year proptype ind12) vce(cluster code)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)

## ROE
eststo clear
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if under_roe==1, abs(year proptype ind12) vce(cluster code)
eststo est1
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if under_roe==0, abs(year proptype ind12) vce(cluster code)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)

## AR12
eststo clear
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if under_arp50==1, abs(year proptype ind12) vce(cluster code)
eststo est1
reghdfe wveto onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if under_arp50==0, abs(year proptype ind12) vce(cluster code)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)

## Test
reghdfe wveto onlinevote under_roa_online under_roa wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype ind12)
reghdfe wveto onlinevote under_roe_online under_roe wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype ind12)
reghdfe wveto onlinevote under_arp50_online under_arp50 wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype ind12)


###########
## Table 8 The Effect of Institutional Investors
###########
## VOTE
eststo clear
reghdfe wvote onlinevote wtop1 wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if wins_above==1, abs(year proptype ind12) vce(cluster meet)
eststo est1
reghdfe wvote onlinevote wtop1 wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if wins_above==0, abs(year proptype ind12) vce(cluster meet)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)

## VETO
eststo clear
reghdfe wveto onlinevote wtop1 wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if wins_above==1, abs(year proptype ind12) vce(cluster meet)
eststo est1
reghdfe wveto onlinevote wtop1 wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if wins_above==0, abs(year proptype ind12) vce(cluster meet)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)

## Test
reghdfe wvote i.onlinevote##i.wins_above wtop1 wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype ind12)
reghdfe wveto i.onlinevote##i.wins_above wtop1 wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(year proptype ind12)


###########
## Table 9 The Effect of Segmented Voting
###########
eststo clear
reghdfe wvote classvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if year==2005, abs(proptype ind12) vce(cluster code)
eststo est1
reghdfe wveto classvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if year==2005, abs(proptype ind12) vce(cluster code)
eststo est2
reghdfe wvote classvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if year==2005 & onlinevote==1, abs(proptype ind12) vce(cluster code)
eststo est3
reghdfe wveto classvote onlinevote wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12 if year==2005 & onlinevote==1, abs(proptype ind12) vce(cluster code)
eststo est4
estout est1 est2 est3 est4, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)


###########
## Table 10 Outcomes of Shareholder Voting
###########
## Panel A
ta proptype onlinevote if pass==1
ta proptype onlinevote if pass==0

## Panel B
tabstat wvote wveto vote_all veto_all if pass==0, stat(n mean sd median) long col(stat) f(%9.0g %9.4f)
su onlinevote classvote if pass==0


###########
## Table 11 Outcomes of Shareholder Voting
###########
eststo clear
reghdfe w_ln_nextnum wveto wsize wlev wroaa wbm wtop1 winstinvest woutshare wsoe boardsize dindepend dual, abs(year proptype ind12) vce(cluster code)
eststo est1
reghdfe w_next_voteall wveto wsize wlev wroaa wbm wtop1 winstinvest woutshare wsoe boardsize dindepend dual, abs(year proptype ind12) vce(cluster code)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)


use datadid, clear
###########
## Table 5
###########
eststo clear
reghdfe wvote did post wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(proptype code) vce(r)
eststo est1
reghdfe wveto did post wtop1 winstinvest wsize wsoe boardsize dindepend wbm wmarket wgdp dual wAR12, abs(proptype code) vce(r)
eststo est2
estout est1 est2, cells(b(star fmt(%5.4f)) t(par fmt(%3.2f))) stats(N r2_a, fmt(%9.0g %9.3f)) unstack starlevels(* 0.10 ** 0.05 *** 0.01)
